const express = require("express");
const router = express.Router();
const dictService = require("./service/DictServiceImpl");

// 新增
router.post("/saveOrUpdate", (req, res, next) => {
  dictService.saveOrUpdate(req, res, next);
});

// 删除 会删除所有下属字典项
router.post("/batchDelete", (req, res, next) => {
  dictService.batchDelete(req, res, next);
});

// 获取当前分页数据
router.post("/page", (req, res, next) => {
  dictService.getDictPage(req, res, next);
});

// 获取当前全量可用数据(子表status为1)
router.post("/list", (req, res, next) => {
  dictService.getDictList(req, res, next);
});

module.exports = router;
